<!--
 * @Author: wjc
 * @Date: 2025-02-13 14:52:31
 * @LastEditors: wjc
 * @LastEditTime: 2025-10-28 11:30:06
 * @Description: 
-->
<template>
  <ScaffoldTrashed :entity="entity" :actions="actions" @on-fetched="handleFetch">
    <template #column_avatar_url="{ row }">
      <MAvatar :url="row.avatar_url" :size="48" :name="row.real_name" />
    </template>

    <template #column_real_name="{ row }">
      <div>
        {{ row.real_name }}
        <span v-if="row.staff_code" class="color-info font-s-14px">({{ row.staff_code }})</span>
      </div>
      <div class="color-info">
        {{ row.gender_txt }}
      </div>
    </template>

    <template #column_positions="{ row }">
      {{ joinBy(row.positions, 'position_name') }}
    </template>
  </ScaffoldTrashed>
</template>

<script setup lang="ts">
  import { joinBy } from '#/utils'
  import { getTrashedActions } from '#/utils/auth'

  defineOptions({
    name: `${entity}Trashed`,
  })
  const entity = 'Personnel'
  const actions = getTrashedActions('system-personnel')
</script>
